home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000112_icon-group-sender _Fri Apr 11 08:13:13 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Received: from kingfisher.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Mon, 14 Apr 1997 09:14:12 MST
Received: by kingfisher.CS.Arizona.EDU; (5.65v3.2/1.1.8.2/08Nov94-0446PM)
id AA03068; Mon, 14 Apr 1997 09:14:12 -0700
To: icon-group@cs.arizona.edu
Date: Fri, 11 Apr 1997 08:13:13 -0700
From: Steve Wampler <swampler@gemini.edu>
Message-Id: <334E5509.2A4@gemini.edu>
Organization: Gemini 8m Telescopes Project
Sender: icon-group-request@cs.arizona.edu
References: <334D453B.72FD@anu.edu.au>
Subject: Re: Records in Icon
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1266
Stuart Robinson wrote:
>
> Does anyone know a way to check two fields of two entries in a record to
> see whether either one of the fields in the two entries share an
> identical value?
>
> For example, given a record with three entries and 5 fields like the
> following (where the 4th and 5th field are empty in entries 1 and 3)
>
> 1 5 X
> 2 5 X 6 Y
> 3 6 X
>
> how could one check to see whether successive entires (1 and 2 or 2 and
> 3) share a common value in either the second or the fourth field?
>
> In other words, how could one write a program that would tell you both
> when 1 and 2 share a common value (5) via the 2nd field and when 2 and 3
> share a common value (6) via the 4th field of 2 and the 2nd field of 3?
Do you care why the two records 'match'? That is, do you need to
distinguish between your two example cases, or is it sufficient to
simply say "the records 'match'"?
Here's a procedure that handles the latter case:
procedure weakMatch(r1,r2)
return !r1 ~=== !r2
end
Why are you doing these things, though?
--
Steve Wampler - swampler@gemini.edu [Gemini 8m Telescopes Project (under
AURA)]
O Sibile, si ergo, fortibus es inero.
Nobile, demis trux. Demis phulla causan dux.